//奇妙变换
#include <bits/stdc++.h>
using namespace std;

long long solve(long long x)
{
	long long result = 0;
	if(x <= 10)
		result = x*(x-1);
	else
		result = 2*x*solve(x-6);
	return result%998244353;
}
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int input = 0;
	cin >> input;
	long long ans = solve(input);
	cout << ans;
	return 0;
}
